package cn.edu.scau.cmi.wuzhenxin.simpleFactory;

import cn.edu.scau.cmi.wuzhenxin.domain.*;

public class SimpleFactory {
	public Insure getInstance(String name) {
		switch (name) {
		case "驾驶员身体受伤":
			return new DriverInsure();
		case "汽车损坏":
			return new CarInsure();
		case "人员伤亡":
			return new PeopleInsure();
		case "多种事故":
			return new MulInsure();
		default:
			return null;
		}
	}
}
